package com.song.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author Klys
 * @Date 2022/3/15 20:12
 * @Version 1.0
 */
@Configuration
public class ConfigBean {

    @Bean
    @LoadBalanced   //使用ribbion进行负载均衡
    public RestTemplate getRestTemple(){
        return new RestTemplate();
    }
}
